package com.gscitysfy.cus.drain.domain;

import cn.hutool.core.collection.CollectionUtil;

import com.gscitysfy.cus.drain.modules.duty.entity.MoperDutyMnRota;
import com.gscitysfy.cus.drain.modules.duty.entity.MoperDutyRlRecord;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 史鹏 E-mail:754572960@qq.com
 * @version 创建时间：2022/4/21 17:26
 */
@Data
public class DutyPlanResult {
    /**
     * 排班记录集合
     */
    private List<MoperDutyMnRota> rotaList = new ArrayList<>();
    /**
     * 值班信息集合
     */
    private List<MoperDutyRlRecord> recordList = new ArrayList<>();

    public void addAllRotaList(List<MoperDutyMnRota> rotaList) {
        if (CollectionUtil.isNotEmpty(rotaList)) {
            this.rotaList.addAll(rotaList);
        }
    }

    public void addAllRecordList(List<MoperDutyRlRecord> recordList) {
        if (CollectionUtil.isNotEmpty(recordList)) {
            this.recordList.addAll(recordList);
        }
    }
}
